import React, {useEffect, useState} from 'react';
import {observer} from 'mobx-react';
import UserInfoStore from './store/UserInfoStore.js';
import Login from './Login.jsx';

const UserInfo = () => {
	if (!UserInfoStore.isLogin) {
		return <Login/>;
	}
	return <div>
		<strong>欢迎回来，{UserInfoStore.username}</strong>
	</div>;
};

export default observer(UserInfo);